package com.oraro.paygatewaybiz.constant;

/**
 * @Author: jianghuiyong
 * @Date: 2018/11/16 12:00
 * @Version 1.0
 */
public interface Constants {


    /**
     * 支付渠道
     */
    enum PayChannelType {

        WXPAY("wxpay"),
        ALIPAY("alipay"),
        UNIONPAY("unionpay");

        private String type;

        PayChannelType(String type){
            this.type = type;
        }

        public String getType() {
            return type;
        }
    }

    /**
     * 接口代理类型
     */
    enum ProxyType {

        CHANNELPROXY("channel"),
        WXPAYPROXY("wxpay"),
        ALIPAYPROXY("alipay");

        private String type;
        ProxyType (String type) {
            this.type = type;
        }
        public String getType() {
            return type;
        }
    }
    /**
     * 支付状态
     */
    enum PayStatus {

        UNPAID(0),
        PAID(1);

        private int type;

        PayStatus (int type) {
            this.type = type;
        }

        public int getType() {
            return type;
        }

    }

    /**
     * 缓存类型
     */
    enum CacheType {

        CHANNELTYPECACHE("CHANNELTYPE_CACHE_"),
        CHANNELLISTCACHE("CHANNELLIST_CACHE_"),
        MCHCACHE("MCH_CACHE_");

        private String type;

        CacheType (String type) {
            this.type = type;
        }

        public String getType() {
            return type;
        }
    }

    enum tradePrefix {
        WX("WX"),
        ALI("ALI");

        private String type;

        tradePrefix(String type) {
            this.type = type;
        }

        public String getType() {
            return type;
        }

    }

    enum tradeType {
        WXJSAPI("WXJSAPI"),
        WXAPP("WXAPP"),
        WXNATIVE("WXNATIVE"),
        WXMWEB("WXMWEB"),
        ALIJSAPI("ALIJSAPI"),
        ALIAPP("ALIAPP"),
        ALINATIVE("ALINATIVE"),
        ALIMWEB("ALIMWEB");

        private String type;

        tradeType (String type) {
            this.type = type;
        }

        public String getType() {
            return type;
        }
    }

    /**
     * 默认货币类型(人民币)
     */
    String FEETYPE = "CNY";

    String TYPE = "type";

    String UTF8 = "UTF-8";

//    String ALIGATEWAYURL = "https://openapi.alipay.com/gateway.do";
    String ALIGATEWAYURL = "https://openapi.alipaydev.com/gateway.do";

    String RSA2 = "RSA2";

    String JSON = "json";

    String TIMEOUTEXPRESS = "30m";

    String RETURN_ALIPAY_VALUE_SUCCESS = "success";
    String RETURN_ALIPAY_VALUE_FAIL = "fail";
}
